# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WalletObjects.V1.Model.AirportInfo do
  @moduledoc """


  ## Attributes

  *   `airportIataCode` (*type:* `String.t`, *default:* `nil`) - Three character IATA airport code. This is a required field for `origin` and `destination`. Eg: "SFO"
  *   `airportNameOverride` (*type:* `GoogleApi.WalletObjects.V1.Model.LocalizedString.t`, *default:* `nil`) - Optional field that overrides the airport city name defined by IATA. By default, Google takes the `airportIataCode` provided and maps it to the official airport city name defined by IATA. Official IATA airport city names can be found at IATA airport city names website. For example, for the airport IATA code "LTN", IATA website tells us that the corresponding airport city is "London". If this field is not populated, Google would display "London". However, populating this field with a custom name (eg: "London Luton") would override it.
  *   `gate` (*type:* `String.t`, *default:* `nil`) - A name of the gate. Eg: "B59" or "59"
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string `"walletobjects#airportInfo"`.
  *   `terminal` (*type:* `String.t`, *default:* `nil`) - Terminal name. Eg: "INTL" or "I"
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :airportIataCode => String.t() | nil,
          :airportNameOverride => GoogleApi.WalletObjects.V1.Model.LocalizedString.t() | nil,
          :gate => String.t() | nil,
          :kind => String.t() | nil,
          :terminal => String.t() | nil
        }

  field(:airportIataCode)
  field(:airportNameOverride, as: GoogleApi.WalletObjects.V1.Model.LocalizedString)
  field(:gate)
  field(:kind)
  field(:terminal)
end

defimpl Poison.Decoder, for: GoogleApi.WalletObjects.V1.Model.AirportInfo do
  def decode(value, options) do
    GoogleApi.WalletObjects.V1.Model.AirportInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WalletObjects.V1.Model.AirportInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
